Component({
  mixins: [],
  data: {
    isShowAgreement: false,
    agreementType: 1,
    isShowReceiveYindao: false,
  },
  props: {
    rootImagePath: ''
  },
  didMount() {
    // this.$page.keepAgreementParent = this
  },
  didUpdate() {},
  didUnmount() {},
  methods: {
    showQuanyiReceiveYindao() {
      let urls = 'https://web.78keji.cn/newlq/#/'
      let url =
        'https://ulink.alipay.com/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FsaId%3D10000007%26clientVersion%3D3.7.0.0718%26qrcode%3D' +
        encodeURIComponent(encodeURIComponent(urls));
      my.ap.openURL({
        url: url, // 请将 url 替换为有效的页面地址
        success: (res) => {
          console.log('openURL success', res)
        },
        fail: (err) => {
          console.log('openURL success', err)
        }
      });
    },
    closeReceiveYinDao() {
      this.setData({
        isShowReceiveYindao: false
      })
    },
    showAgreementHandler(e) {
      // console.log('showAgreementHandler1',e.target.dataset.attr);
      this.setData({
        agreementType: parseInt(e.target.dataset.attr),
        isShowAgreement: true
      })
    },
    agreementOkHandler() {
      this.setData({
        isShowAgreement: false
      })
    },
    gotoMini() {
      my.navigateToMiniProgram({
        appId: '2021004135681441',
        path: 'pages/keeplq/keeplq',
        success: function (res) {
          console.log('跳转小程序成功', res);
        },
        fail: function (err) {
          console.log('跳转小程序失败', err);
        }
      });
    },
    gotoPage(pageUrl) {
      my.navigateTo({
        url: pageUrl
      })
    },
    telHandler() {
      my.makePhoneCall({
        number: '4008825101',

      });
    }
  },
});